package com.ai.module.order.domain.entity;

import com.ai.module.chat.common.domain.BaseEntity;
import com.ai.module.order.en.OrderStatus;
import com.ai.module.order.en.UserServiceType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * @author: MrHe
 * @create: 2024-02-04 23:45
 * @description:
 **/

@TableName("wx_order")
@Data
public class WxOrderEntity extends BaseEntity {

    /**
     * 商品描述
     */
    @TableField("goods_desc")
    String goodsDesc;

    /**
     * 签名
     */
    @TableField("order_sn")
    String orderSn;

    /**
     * 订单号
     */
    @TableField("order_id")
    String orderId;

    /**
     * SUCCESS：支付成功
     * REFUND：转入退款
     * NOTPAY：未支付
     * CLOSED：已关闭
     * REVOKED：已撤销(仅付款码支付会返回)
     * USERPAYING：用户支付中(仅付款码支付会返回)
     * PAYERROR：支付失败(仅付款码支付会返回)
     */
    @TableField("order_status")
    OrderStatus orderStatus;

    @TableField("amount")
    private int amount;

    @TableField("user_id")
    private String userId;

    // prepay_id
    @TableField("prepay_id")
    private String prepayId;

    @TableField("service_type")
    private UserServiceType serviceType;

//    UserServiceType

    public void setAmount(int amount) {
        this.amount = 1;
    }
}
